<!DOCTYPE html>
<html>
<head>
    <title>Modifier Keys Example</title>
    <script type="text/javascript" src="EventUtil.js"></script>
</head>
<body>
    <div id="myDiv" style="background-color:red;height:100px;width:100px">Click me while holding a modifier key</div>
    <script type="text/javascript">
        var div = document.getElementById("myDiv");
        EventUtil.addHandler(div, "click", function(event){
            event = EventUtil.getEvent(event);
            var keys = new Array();
        
            if (event.shiftKey){
                keys.push("shift");
            }
        
            if (event.ctrlKey){
                keys.push("ctrl");
            }
        
            if (event.altKey){
                keys.push("alt");
            }
        
            if (event.metaKey){
                keys.push("meta");
            }
        
            alert("Keys: " + keys.join(","));
        
        }); 

    </script>
</body>
</html>
